package com.aibaixun.web.controller.system;

import com.alibaba.fastjson.JSONObject;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <b>TestController</b>
 *
 * @description: TestController <br>
 * @date: 2024/8/27 14:14 <br>
 * @author: lhm <br>
 * @version: 1.0 <br>
 */

@RestController
public class TestController {


    @PostMapping("/test")
    public void testData(@RequestBody MqttMessage mqttMessage){
        JSONObject jsonData = JSONObject.parseObject(new String(mqttMessage.getPayload()));
        System.out.println(jsonData);
    }
}
